chore(dev): Claude hooks, AGENTS.md, dev-shell search tooling - #644
Open
mfw78 wants to merge 2 commits into
Open
chore(dev): Claude hooks, AGENTS.md, dev-shell search tooling#644mfw78 wants to merge 2 commits into
mfw78 wants to merge 2 commits into
Conversation
…oling Add the shared agent tooling this repo lacked after the carve. .claude/hooks/ carries three tested hooks: rustfmt-on-edit.sh formats each edited .rs file at edition 2024 (the workspace edition), content-lint.sh blocks an edit that adds an em-dash to a .rs or .md file, and nextest-on-stop.sh runs nextest for the crates with uncommitted .rs changes at the end of a turn. Each hook is a no-op when its tool is absent, so nothing runs outside the dev shell. .claude/settings.json wires them to the PostToolUse and Stop events. AGENTS.md states the repo contract: what shepherd is, the crate and config layout, the nexum-runtime and videre-nexum-module rev pins, the build and test commands, and the house rules. CLAUDE.md is a symlink to it. The file follows ASD-STE100 Simplified Technical English with one sentence per line. flake.nix gains ripgrep and ast-grep in the devShell; cargo-nextest was already there. .config/nextest.toml adds a 60s slow-timeout that terminates a hung test after 5 periods. The justfile and CI are unchanged: they already run cargo nextest run plus a separate cargo test --doc. .gitignore previously ignored all of .claude/. It now tracks settings.json and hooks/ and keeps settings.local.json and worktrees/ ignored. AI Assistance: Claude Opus used for the hooks, AGENTS.md, and flake change
content-lint scanned the whole file, so any edit to a file that already carried an em-dash was blocked even when the edit added none. That made an existing README or comment effectively uneditable. Compare the count against the committed version of the same file and block only on a net increase. A file that already carries the token stays editable, and adding one is still blocked. AI Assistance: Claude Opus used for this fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the shared agent tooling this repo lacked after the carve: the Claude Code hooks, an
AGENTS.mdcontract, and two supporting dev-shell and test-runner changes. No source, justfile, or CI change..claude/hooks/carries three hooks copied from the sibling repo where they are already in use.rustfmt-on-edit.shformats each edited.rsfile at edition 2024, which matches this workspace.content-lint.shblocks an edit that adds an em-dash to a.rsor.mdfile.nextest-on-stop.shruns nextest for the crates with uncommitted.rschanges at the end of a turn. Each hook exits cleanly when its tool is missing, so nothing runs outside thenix developshell..claude/settings.jsonwires them to the PostToolUse and Stop events.AGENTS.md(83 lines) states what shepherd is, the crate andengine*.tomllayout, theextensions.tomlcapability registry, the pinned nexum-runtime and videre-nexum-module revs and the rule that a bump moves the crate manifests,wit/deps.toml, andwit/deps/together, the build and test commands, and the house rules. Every claim is grounded in the README,Cargo.toml, the crate manifests,extensions.toml, the justfile, and the CI workflows.CLAUDE.mdis a symlink to it, committed with mode 120000.flake.nixgainsripgrepandast-grepin the devShell package list;cargo-nextestwas already present and nothing was removed..config/nextest.tomlis new and sets a 60s slow-timeout that terminates a hung test after 5 periods. The justfile and CI already runcargo nextest runplus a separatecargo test --doc, so they are untouched..gitignorepreviously ignored all of.claude/. It now trackssettings.jsonandhooks/and keepssettings.local.jsonandworktrees/ignored.Validation:
jq -eparsessettings.json,tomllibparses.config/nextest.toml,nix-instantiate --parseparsesflake.nix,bash -nparses each hook,content-lint.shblocks an em-dash fixture and passes a clean one, andrg -Ffinds no em-dash inAGENTS.md.Closes #643
AI Assistance: Claude Opus used for the recon, the hooks, AGENTS.md, and the flake change.